﻿
var setting = {
    view: {
        dblClickExpand: false
    },
    check: {
        enable: false
    },
    callback: {
        onClick: onClick  // 定义点击事件的处理函数
    }
};
var zNodes =[
    {"id":0,"name":"决策清册","open":true,icon:"/visual/table/img/down1.png",children:[
        { "id":1,"pid":0, "name":"一户式","open":true, icon:"/visual/table/img/page.png",
            children: [
                { "id":11,"pid":1, "name":"纳税人查询"},
            ]
        },
        {"id":2,"pid":0,"name":"涉税数据",icon:"/visual/table/img/page.png",
            children: [
                { "id":21,"pid":2, "name":"登记信息"},
                { "id":22,"pid":2, "name":"申报信息"},
                
                { "id":23,"pid":2, "name":"入库信息"},
                { "id":24,"pid":2, "name":"发票信息"},
            ]
        },
        {"id":3,"pid":0,"name":"监控数据",icon:"/visual/table/img/page.png",
            children: [
                { "id":31,"pid":3, "name":"车流信息"},
                { "id":32,"pid":3, "name":"预警信息"},
                
            ]
        },
    ]}

];





var zTree;
$(document).ready(function(){
    $.fn.zTree.init($("#treeDemo"), setting, zNodes);
    zTree = $.fn.zTree.getZTreeObj("treeDemo");

});

function onClick(event, treeId, treeNode) {
    console.log(treeNode.name);
    var name = treeNode.name;
    if(name == "登记信息"){
    	
    }else if(name == "申报信息"){
    	
    }else if(name == "入库信息"){
    	
    }else if(name == "发票信息"){
    	
    }else if(name == "车流信息"){
    	
    }else if(name == "预警信息"){
   
    }else{
    	
    }
}


function init(){
    $(".dataTabUl li").click(function(){
        var ins=$(this).index();
        $(this).find("a").addClass("dataActive").end().siblings().find("a").removeClass("dataActive");
        $(".dataConBox .dataBoxSub").eq(ins).show().siblings().hide();
    })
}

function Tail(){
    layer.open({
        type: 2,
        title: '涉案人员详情',
        shadeClose: true,
        shade: 0.5,
        skin: 'layui-layer-rim',
        closeBtn:1,
        area: ['1100px', '600px'],
        content: 'openPerTail.html'
    });
}
function TailLaw(){
    layer.open({
        type: 2,
        title: '法律文书详情',
        shadeClose: true,
        shade: 0.5,
        skin: 'layui-layer-rim',
        closeBtn:1,
        area: ['1100px', '300px'],
        content: 'lawTail.html'
    });
}
function TailList(){
    layer.open({
        type: 2,
        title: '宗卷详情',
        shadeClose: true,
        shade: 0.5,
        skin: 'layui-layer-rim',
        closeBtn:1,
        area: ['1100px', '300px'],
        content: 'caseListTail.html'
    });
}
